﻿using System;
using System.Text;

namespace mfRCF.Rss
{
    public class Channel
    {
        public Channel() 
        {
            item = new FeedItemCollection();
        }

        public string title { get; set; }
        public string link { get; set; }
        public string description { get; set; }
        public string language { get; set; }
        public DateTime pubDate { get; set; }
        public DateTime lastBuildDate { get; set; }
        public string docs { get; set; }
        public string generator { get; set; }
        public string managingEditor { get; set; }
        public string webMaster { get; set; }

        public FeedItemCollection item { get; set; }

        public override string ToString()
        {
            StringBuilder s = new StringBuilder();
            s.AppendLine("channel:");
            s.AppendLine("title: " + title);
            s.AppendLine("link: " + link);
            s.AppendLine("description: " + description);
            s.AppendLine("language: " + language);
            s.AppendLine("pubDate: " + pubDate);
            s.AppendLine("lastBuildDate: " + lastBuildDate);
            s.AppendLine("docs: " + docs);
            s.AppendLine("generator: " + generator);
            s.AppendLine("managingEditor: " + managingEditor);
            s.AppendLine("webMaster: " + webMaster);

            s.AppendLine(item.ToString());

            return s.ToString();
        }
    }
}
